public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public static void main(String args[]) { System.out.println("- Downloader started"); File baseDirectory = new File(args[0]); System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); // If the maven-wrapper.properties exists, read it and check if it contains a custom // wrapperUrl parameter. File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); String url = DEFAULT_DOWNLOAD_URL; if (mavenWrapperPropertyFile.exists()) { FileInputStream mavenWrapperPropertyFileInputStream = null; try { mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); Properties mavenWrapperProperties = new Properties(); mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); } catch (IOException e) { System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); } finally { try { if (mavenWrapperPropertyFileInputStream != null) { mavenWrapperPropertyFileInputStream.close(); } } catch (IOException e) { // Ignore ... } } } System.out.println("- Downloading from: : " + url); File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); if (!outputFile.getParentFile().exists()) { if (!outputFile.getParentFile().mkdirs()) { System.out.println( "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); } } System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); try { downloadFileFromURL(url, outputFile); System.out.println("Done"); System.exit(0); } catch (Throwable e) { System.out.println("- Error downloading"); e.printStackTrace(); System.exit(1); } }
public CorsFilter corsFilter() { final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); final CorsConfiguration config = new CorsConfiguration(); config.setAllowCredentials(true); // 允许cookies跨域 //config.addAllowedOrigin("http://localhost:8082");// #允许向该服务器提交请求的URI,*表示全部允许,在SpringMVC中,如果设成*,会自动转成当前请求头中的Origin config.addAllowedOrigin("*");// #允许向该服务器提交请求的URI,*表示全部允许,在SpringMVC中,如果设成*,会自动转成当前请求头中的Origin config.addAllowedHeader("*");// #允许访问的头信息,*表示全部 config.addAllowedMethod("*");// 允许提交请求的方法,*表示全部允许 source.registerCorsConfiguration("/**", config); return new CorsFilter(source); }
public CorsFilter corsFilter() { final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); final CorsConfiguration config = new CorsConfiguration(); config.setAllowCredentials(true); // 允许cookies跨域 //config.addAllowedOrigin("http://regist.727pan.cn");// #允许向该服务器提交请求的URI,*表示全部允许,在SpringMVC中,如果设成*,会自动转成当前请求头中的Origin //config.addAllowedOrigin("http://727pan.cn");// #允许向该服务器提交请求的URI,*表示全部允许,在SpringMVC中,如果设成*,会自动转成当前请求头中的Origin config.addAllowedOrigin("*");// #允许向该服务器提交请求的URI,*表示全部允许,在SpringMVC中,如果设成*,会自动转成当前请求头中的Origin config.addAllowedHeader("*");// #允许访问的头信息,*表示全部 config.addAllowedMethod("*");// 允许提交请求的方法,*表示全部允许 source.registerCorsConfiguration("/**", config); return new CorsFilter(source); }
public UserSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public WareSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public WareSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public ThirdSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public WareSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public SeckillSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public WareSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public SearchSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public WareSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public OrderSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public WareSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public Oauth2SentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public WareSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public GoodsSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public CouponSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public WareSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public WareSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public CartSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public UserSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public ThirdSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public UserSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public SeckillSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public UserSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public SearchSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public UserSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public OrderSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public UserSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public Oauth2SentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public UserSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public GoodsSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public CouponSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public UserSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public UserSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public CartSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public SeckillSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public ThirdSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public SearchSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public ThirdSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public ThirdSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public OrderSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public ThirdSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public Oauth2SentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public ThirdSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public GoodsSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public CouponSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public ThirdSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public ThirdSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public CartSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public SeckillSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public SearchSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public SeckillSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public OrderSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public SeckillSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public Oauth2SentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public SeckillSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public GoodsSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public CouponSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public SeckillSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public SeckillSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public CartSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public SearchSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public OrderSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public SearchSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public Oauth2SentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public SearchSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public GoodsSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public CouponSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public SearchSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public SearchSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public CartSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public OrderSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public Oauth2SentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public GoodsSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public OrderSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public CouponSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public OrderSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public CartSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public OrderSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public GoodsSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public Oauth2SentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public CouponSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public Oauth2SentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public CartSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public Oauth2SentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public CouponSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public GoodsSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public GoodsSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public CartSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public CouponSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public CartSentinelConfig(){ WebCallbackManager.setUrlBlockHandler(new UrlBlockHandler() { @Override public void blocked(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, BlockException e) throws IOException { R error = R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg()); httpServletResponse.setCharacterEncoding("UTF-8"); httpServletResponse.setContentType("application"); httpServletResponse.getWriter().write(JSON.toJSONString(error)); } }); }
public MappingJackson2HttpMessageConverter jackson2HttpMessageConverter() { MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(); ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); mapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")); SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(Long.class, ToStringSerializer.instance); simpleModule.addSerializer(Long.TYPE, ToStringSerializer.instance); mapper.registerModule(simpleModule); converter.setObjectMapper(mapper); return converter; }
public MappingJackson2HttpMessageConverter jackson2HttpMessageConverter() { MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(); ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); mapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")); SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(Long.class, ToStringSerializer.instance); simpleModule.addSerializer(Long.TYPE, ToStringSerializer.instance); mapper.registerModule(simpleModule); converter.setObjectMapper(mapper); return converter; }
public MappingJackson2HttpMessageConverter jackson2HttpMessageConverter() { MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(); ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); mapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")); SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(Long.class, ToStringSerializer.instance); simpleModule.addSerializer(Long.TYPE, ToStringSerializer.instance); mapper.registerModule(simpleModule); converter.setObjectMapper(mapper); return converter; }
public MappingJackson2HttpMessageConverter jackson2HttpMessageConverter() { MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(); ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); mapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")); SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(Long.class, ToStringSerializer.instance); simpleModule.addSerializer(Long.TYPE, ToStringSerializer.instance); mapper.registerModule(simpleModule); converter.setObjectMapper(mapper); return converter; }
public MappingJackson2HttpMessageConverter jackson2HttpMessageConverter() { MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(); ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); mapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")); SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(Long.class, ToStringSerializer.instance); simpleModule.addSerializer(Long.TYPE, ToStringSerializer.instance); mapper.registerModule(simpleModule); converter.setObjectMapper(mapper); return converter; }
public MappingJackson2HttpMessageConverter jackson2HttpMessageConverter() { MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(); ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); mapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")); SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(Long.class, ToStringSerializer.instance); simpleModule.addSerializer(Long.TYPE, ToStringSerializer.instance); mapper.registerModule(simpleModule); converter.setObjectMapper(mapper); return converter; }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.oms.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.laboratory.**.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.admin.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.oms.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.sms.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.oms.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.oms.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.pms.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.ums.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.oms.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.oms.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.auth.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.admin.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.laboratory.**.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.sms.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.laboratory.**.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.pms.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.laboratory.**.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.ums.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.laboratory.**.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.auth.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.laboratory.**.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.admin.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.sms.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.admin.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.pms.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.ums.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.admin.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.admin.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.auth.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.sms.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.pms.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.ums.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.sms.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.sms.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.auth.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.ums.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.pms.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.auth.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.pms.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.mall.ums.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
public Docket restApi() { //schema List<GrantType> grantTypes=new ArrayList<>(); //密码模式 String passwordTokenUrl="http://localhost:9999/youlai-auth/oauth/token"; ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl); grantTypes.add(resourceOwnerPasswordCredentialsGrant); OAuth oAuth=new OAuthBuilder().name("oauth2") .grantTypes(grantTypes).build(); //context //scope方位 List<AuthorizationScope> scopes=new ArrayList<>(); scopes.add(new AuthorizationScope("read","read resources")); scopes.add(new AuthorizationScope("write","write resources")); scopes.add(new AuthorizationScope("reads","read all resources")); scopes.add(new AuthorizationScope("writes","write all resources")); SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{})); SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/**")); //schemas List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth); //securyContext List<SecurityContext> securityContexts=Lists.newArrayList(securityContext); return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.youlai.auth.controller")) .paths(PathSelectors.any()) .build() .securityContexts(securityContexts) .securitySchemes(securitySchemes) .apiInfo(apiInfo()); }
protected void configure(HttpSecurity http) throws Exception { ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry config = http.requestMatchers().anyRequest() .and() .formLogin() .and() .apply(smsCodeAuthenticationSecurityConfig) .and() .apply(socialAuthenticationSecurityConfig) .and() .authorizeRequests(); ignoreUrlPropsConfig.getUrls().forEach(url -> { config.antMatchers(url).permitAll(); }); ignoreUrlPropsConfig.getIgnoreSecurity().forEach(url -> { config.antMatchers(url).permitAll(); }); config //任何请求 .anyRequest() //都需要身份认证 .authenticated() //csrf跨站请求 .and() .csrf().disable(); }
public void configure(HttpSecurity http) throws Exception { ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry config = http.requestMatchers().anyRequest() .and() .authorizeRequests(); ignoreUrlPropsConfig.getUrls().forEach(url -> { config.antMatchers(url).permitAll(); }); ignoreUrlPropsConfig.getIgnoreSecurity().forEach(url -> { config.antMatchers(url).permitAll(); }); config //任何请求 .anyRequest() //都需要身份认证 .authenticated() //csrf跨站请求 .and() .csrf().disable(); }
protected JwtAccessTokenConverter jwtTokenEnhancer() { JwtAccessTokenConverter converter = new JwtAccessTokenConverter(); Resource resource = new ClassPathResource("public.cert"); String publicKey ; try { publicKey = new String(FileCopyUtils.copyToByteArray(resource.getInputStream())); } catch (IOException e) { throw new RuntimeException(e); } converter.setVerifierKey(publicKey); return converter; }
protected JwtAccessTokenConverter jwtTokenEnhancer() { JwtAccessTokenConverter converter = new JwtAccessTokenConverter(); Resource resource = new ClassPathResource("public.cert"); String publicKey ; try { publicKey = new String(FileCopyUtils.copyToByteArray(resource.getInputStream())); } catch (IOException e) { throw new RuntimeException(e); } converter.setVerifierKey(publicKey); return converter; }
protected JwtAccessTokenConverter jwtTokenEnhancer() { JwtAccessTokenConverter converter = new JwtAccessTokenConverter(); Resource resource = new ClassPathResource("public.cert"); String publicKey ; try { publicKey = new String(FileCopyUtils.copyToByteArray(resource.getInputStream())); } catch (IOException e) { throw new RuntimeException(e); } converter.setVerifierKey(publicKey); return converter; }
protected JwtAccessTokenConverter jwtTokenEnhancer() { JwtAccessTokenConverter converter = new JwtAccessTokenConverter(); Resource resource = new ClassPathResource("public.cert"); String publicKey ; try { publicKey = new String(FileCopyUtils.copyToByteArray(resource.getInputStream())); } catch (IOException e) { throw new RuntimeException(e); } converter.setVerifierKey(publicKey); return converter; }
protected JwtAccessTokenConverter jwtTokenEnhancer() { JwtAccessTokenConverter converter = new JwtAccessTokenConverter(); Resource resource = new ClassPathResource("public.cert"); String publicKey ; try { publicKey = new String(FileCopyUtils.copyToByteArray(resource.getInputStream())); } catch (IOException e) { throw new RuntimeException(e); } converter.setVerifierKey(publicKey); return converter; }
protected JwtAccessTokenConverter jwtTokenEnhancer() { JwtAccessTokenConverter converter = new JwtAccessTokenConverter(); Resource resource = new ClassPathResource("public.cert"); String publicKey ; try { publicKey = new String(FileCopyUtils.copyToByteArray(resource.getInputStream())); } catch (IOException e) { throw new RuntimeException(e); } converter.setVerifierKey(publicKey); return converter; }
public CacheErrorHandler errorHandler() { return new CacheErrorHandler() { @Override public void handleCacheGetError(RuntimeException e, Cache cache, Object key) { log.warn("获取缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCachePutError(RuntimeException e, Cache cache, Object key, Object value) { log.warn("handleCachePutError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheEvictError(RuntimeException e, Cache cache, Object key) { log.warn("handleCacheEvictError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheClearError(RuntimeException e, Cache cache) { log.warn("清除缓存时异常--- 异常信息:" + e); } }; }
public CacheErrorHandler errorHandler() { return new CacheErrorHandler() { @Override public void handleCacheGetError(RuntimeException e, Cache cache, Object key) { log.warn("获取缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCachePutError(RuntimeException e, Cache cache, Object key, Object value) { log.warn("handleCachePutError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheEvictError(RuntimeException e, Cache cache, Object key) { log.warn("handleCacheEvictError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheClearError(RuntimeException e, Cache cache) { log.warn("清除缓存时异常--- 异常信息:" + e); } }; }
public CacheErrorHandler errorHandler() { return new CacheErrorHandler() { @Override public void handleCacheGetError(RuntimeException e, Cache cache, Object key) { log.warn("获取缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCachePutError(RuntimeException e, Cache cache, Object key, Object value) { log.warn("handleCachePutError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheEvictError(RuntimeException e, Cache cache, Object key) { log.warn("handleCacheEvictError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheClearError(RuntimeException e, Cache cache) { log.warn("清除缓存时异常--- 异常信息:" + e); } }; }
public CacheErrorHandler errorHandler() { return new CacheErrorHandler() { @Override public void handleCacheGetError(RuntimeException e, Cache cache, Object key) { log.warn("获取缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCachePutError(RuntimeException e, Cache cache, Object key, Object value) { log.warn("handleCachePutError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheEvictError(RuntimeException e, Cache cache, Object key) { log.warn("handleCacheEvictError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheClearError(RuntimeException e, Cache cache) { log.warn("清除缓存时异常--- 异常信息:" + e); } }; }
public CacheErrorHandler errorHandler() { return new CacheErrorHandler() { @Override public void handleCacheGetError(RuntimeException e, Cache cache, Object key) { log.warn("获取缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCachePutError(RuntimeException e, Cache cache, Object key, Object value) { log.warn("handleCachePutError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheEvictError(RuntimeException e, Cache cache, Object key) { log.warn("handleCacheEvictError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheClearError(RuntimeException e, Cache cache) { log.warn("清除缓存时异常--- 异常信息:" + e); } }; }
public CacheErrorHandler errorHandler() { return new CacheErrorHandler() { @Override public void handleCacheGetError(RuntimeException e, Cache cache, Object key) { log.warn("获取缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCachePutError(RuntimeException e, Cache cache, Object key, Object value) { log.warn("handleCachePutError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheEvictError(RuntimeException e, Cache cache, Object key) { log.warn("handleCacheEvictError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheClearError(RuntimeException e, Cache cache) { log.warn("清除缓存时异常--- 异常信息:" + e); } }; }
public CacheErrorHandler errorHandler() { return new CacheErrorHandler() { @Override public void handleCacheGetError(RuntimeException e, Cache cache, Object key) { log.warn("获取缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCachePutError(RuntimeException e, Cache cache, Object key, Object value) { log.warn("handleCachePutError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheEvictError(RuntimeException e, Cache cache, Object key) { log.warn("handleCacheEvictError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheClearError(RuntimeException e, Cache cache) { log.warn("清除缓存时异常--- 异常信息:" + e); } }; }
public CacheErrorHandler errorHandler() { return new CacheErrorHandler() { @Override public void handleCacheGetError(RuntimeException e, Cache cache, Object key) { log.warn("获取缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCachePutError(RuntimeException e, Cache cache, Object key, Object value) { log.warn("handleCachePutError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheEvictError(RuntimeException e, Cache cache, Object key) { log.warn("handleCacheEvictError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheClearError(RuntimeException e, Cache cache) { log.warn("清除缓存时异常--- 异常信息:" + e); } }; }
public CacheErrorHandler errorHandler() { return new CacheErrorHandler() { @Override public void handleCacheGetError(RuntimeException e, Cache cache, Object key) { log.warn("获取缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCachePutError(RuntimeException e, Cache cache, Object key, Object value) { log.warn("handleCachePutError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheEvictError(RuntimeException e, Cache cache, Object key) { log.warn("handleCacheEvictError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheClearError(RuntimeException e, Cache cache) { log.warn("清除缓存时异常--- 异常信息:" + e); } }; }
public CacheErrorHandler errorHandler() { return new CacheErrorHandler() { @Override public void handleCacheGetError(RuntimeException e, Cache cache, Object key) { log.warn("获取缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCachePutError(RuntimeException e, Cache cache, Object key, Object value) { log.warn("handleCachePutError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheEvictError(RuntimeException e, Cache cache, Object key) { log.warn("handleCacheEvictError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheClearError(RuntimeException e, Cache cache) { log.warn("清除缓存时异常--- 异常信息:" + e); } }; }
public CacheErrorHandler errorHandler() { return new CacheErrorHandler() { @Override public void handleCacheGetError(RuntimeException e, Cache cache, Object key) { log.warn("获取缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCachePutError(RuntimeException e, Cache cache, Object key, Object value) { log.warn("handleCachePutError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheEvictError(RuntimeException e, Cache cache, Object key) { log.warn("handleCacheEvictError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheClearError(RuntimeException e, Cache cache) { log.warn("清除缓存时异常--- 异常信息:" + e); } }; }
public CacheErrorHandler errorHandler() { return new CacheErrorHandler() { @Override public void handleCacheGetError(RuntimeException e, Cache cache, Object key) { log.warn("获取缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCachePutError(RuntimeException e, Cache cache, Object key, Object value) { log.warn("handleCachePutError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheEvictError(RuntimeException e, Cache cache, Object key) { log.warn("handleCacheEvictError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheClearError(RuntimeException e, Cache cache) { log.warn("清除缓存时异常--- 异常信息:" + e); } }; }
public CacheErrorHandler errorHandler() { return new CacheErrorHandler() { @Override public void handleCacheGetError(RuntimeException e, Cache cache, Object key) { log.warn("获取缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCachePutError(RuntimeException e, Cache cache, Object key, Object value) { log.warn("handleCachePutError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheEvictError(RuntimeException e, Cache cache, Object key) { log.warn("handleCacheEvictError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheClearError(RuntimeException e, Cache cache) { log.warn("清除缓存时异常--- 异常信息:" + e); } }; }
public CacheErrorHandler errorHandler() { return new CacheErrorHandler() { @Override public void handleCacheGetError(RuntimeException e, Cache cache, Object key) { log.warn("获取缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCachePutError(RuntimeException e, Cache cache, Object key, Object value) { log.warn("handleCachePutError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheEvictError(RuntimeException e, Cache cache, Object key) { log.warn("handleCacheEvictError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheClearError(RuntimeException e, Cache cache) { log.warn("清除缓存时异常--- 异常信息:" + e); } }; }
public CacheErrorHandler errorHandler() { return new CacheErrorHandler() { @Override public void handleCacheGetError(RuntimeException e, Cache cache, Object key) { log.warn("获取缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCachePutError(RuntimeException e, Cache cache, Object key, Object value) { log.warn("handleCachePutError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheEvictError(RuntimeException e, Cache cache, Object key) { log.warn("handleCacheEvictError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheClearError(RuntimeException e, Cache cache) { log.warn("清除缓存时异常--- 异常信息:" + e); } }; }
public CacheErrorHandler errorHandler() { return new CacheErrorHandler() { @Override public void handleCacheGetError(RuntimeException e, Cache cache, Object key) { log.warn("获取缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCachePutError(RuntimeException e, Cache cache, Object key, Object value) { log.warn("handleCachePutError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheEvictError(RuntimeException e, Cache cache, Object key) { log.warn("handleCacheEvictError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheClearError(RuntimeException e, Cache cache) { log.warn("清除缓存时异常--- 异常信息:" + e); } }; }
public CacheErrorHandler errorHandler() { return new CacheErrorHandler() { @Override public void handleCacheGetError(RuntimeException e, Cache cache, Object key) { log.warn("获取缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCachePutError(RuntimeException e, Cache cache, Object key, Object value) { log.warn("handleCachePutError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheEvictError(RuntimeException e, Cache cache, Object key) { log.warn("handleCacheEvictError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheClearError(RuntimeException e, Cache cache) { log.warn("清除缓存时异常--- 异常信息:" + e); } }; }
public CacheErrorHandler errorHandler() { return new CacheErrorHandler() { @Override public void handleCacheGetError(RuntimeException e, Cache cache, Object key) { log.warn("获取缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCachePutError(RuntimeException e, Cache cache, Object key, Object value) { log.warn("handleCachePutError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheEvictError(RuntimeException e, Cache cache, Object key) { log.warn("handleCacheEvictError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheClearError(RuntimeException e, Cache cache) { log.warn("清除缓存时异常--- 异常信息:" + e); } }; }
public CacheErrorHandler errorHandler() { return new CacheErrorHandler() { @Override public void handleCacheGetError(RuntimeException e, Cache cache, Object key) { log.warn("获取缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCachePutError(RuntimeException e, Cache cache, Object key, Object value) { log.warn("handleCachePutError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheEvictError(RuntimeException e, Cache cache, Object key) { log.warn("handleCacheEvictError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheClearError(RuntimeException e, Cache cache) { log.warn("清除缓存时异常--- 异常信息:" + e); } }; }
public CacheErrorHandler errorHandler() { return new CacheErrorHandler() { @Override public void handleCacheGetError(RuntimeException e, Cache cache, Object key) { log.warn("获取缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCachePutError(RuntimeException e, Cache cache, Object key, Object value) { log.warn("handleCachePutError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheEvictError(RuntimeException e, Cache cache, Object key) { log.warn("handleCacheEvictError缓存时异常---key: " + key + " 异常信息:" + e); } @Override public void handleCacheClearError(RuntimeException e, Cache cache) { log.warn("清除缓存时异常--- 异常信息:" + e); } }; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public String deserialize(byte[] bytes) { String saveKey = new String(bytes, charset); int indexOf = saveKey.indexOf(prefix); if (indexOf > 0) { log.warn("key缺少前缀"); } else { saveKey = saveKey.substring(indexOf + prefix.length() + 1); } return saveKey; }
public String deserialize(byte[] bytes) { String saveKey = new String(bytes, charset); int indexOf = saveKey.indexOf(prefix); if (indexOf > 0) { log.warn("key缺少前缀"); } else { saveKey = saveKey.substring(indexOf + prefix.length() + 1); } return saveKey; }
public String deserialize(byte[] bytes) { String saveKey = new String(bytes, charset); int indexOf = saveKey.indexOf(prefix); if (indexOf > 0) { log.warn("key缺少前缀"); } else { saveKey = saveKey.substring(indexOf + prefix.length() + 1); } return saveKey; }
public String deserialize(byte[] bytes) { String saveKey = new String(bytes, charset); int indexOf = saveKey.indexOf(prefix); if (indexOf > 0) { log.warn("key缺少前缀"); } else { saveKey = saveKey.substring(indexOf + prefix.length() + 1); } return saveKey; }
public String deserialize(byte[] bytes) { String saveKey = new String(bytes, charset); int indexOf = saveKey.indexOf(prefix); if (indexOf > 0) { log.warn("key缺少前缀"); } else { saveKey = saveKey.substring(indexOf + prefix.length() + 1); } return saveKey; }
public String deserialize(byte[] bytes) { String saveKey = new String(bytes, charset); int indexOf = saveKey.indexOf(prefix); if (indexOf > 0) { log.warn("key缺少前缀"); } else { saveKey = saveKey.substring(indexOf + prefix.length() + 1); } return saveKey; }
public String deserialize(byte[] bytes) { String saveKey = new String(bytes, charset); int indexOf = saveKey.indexOf(prefix); if (indexOf > 0) { log.warn("key缺少前缀"); } else { saveKey = saveKey.substring(indexOf + prefix.length() + 1); } return saveKey; }
public String deserialize(byte[] bytes) { String saveKey = new String(bytes, charset); int indexOf = saveKey.indexOf(prefix); if (indexOf > 0) { log.warn("key缺少前缀"); } else { saveKey = saveKey.substring(indexOf + prefix.length() + 1); } return saveKey; }
public String deserialize(byte[] bytes) { String saveKey = new String(bytes, charset); int indexOf = saveKey.indexOf(prefix); if (indexOf > 0) { log.warn("key缺少前缀"); } else { saveKey = saveKey.substring(indexOf + prefix.length() + 1); } return saveKey; }
public String deserialize(byte[] bytes) { String saveKey = new String(bytes, charset); int indexOf = saveKey.indexOf(prefix); if (indexOf > 0) { log.warn("key缺少前缀"); } else { saveKey = saveKey.substring(indexOf + prefix.length() + 1); } return saveKey; }
public String deserialize(byte[] bytes) { String saveKey = new String(bytes, charset); int indexOf = saveKey.indexOf(prefix); if (indexOf > 0) { log.warn("key缺少前缀"); } else { saveKey = saveKey.substring(indexOf + prefix.length() + 1); } return saveKey; }
public String deserialize(byte[] bytes) { String saveKey = new String(bytes, charset); int indexOf = saveKey.indexOf(prefix); if (indexOf > 0) { log.warn("key缺少前缀"); } else { saveKey = saveKey.substring(indexOf + prefix.length() + 1); } return saveKey; }
public String deserialize(byte[] bytes) { String saveKey = new String(bytes, charset); int indexOf = saveKey.indexOf(prefix); if (indexOf > 0) { log.warn("key缺少前缀"); } else { saveKey = saveKey.substring(indexOf + prefix.length() + 1); } return saveKey; }
public String deserialize(byte[] bytes) { String saveKey = new String(bytes, charset); int indexOf = saveKey.indexOf(prefix); if (indexOf > 0) { log.warn("key缺少前缀"); } else { saveKey = saveKey.substring(indexOf + prefix.length() + 1); } return saveKey; }
public String deserialize(byte[] bytes) { String saveKey = new String(bytes, charset); int indexOf = saveKey.indexOf(prefix); if (indexOf > 0) { log.warn("key缺少前缀"); } else { saveKey = saveKey.substring(indexOf + prefix.length() + 1); } return saveKey; }
public String deserialize(byte[] bytes) { String saveKey = new String(bytes, charset); int indexOf = saveKey.indexOf(prefix); if (indexOf > 0) { log.warn("key缺少前缀"); } else { saveKey = saveKey.substring(indexOf + prefix.length() + 1); } return saveKey; }
public String deserialize(byte[] bytes) { String saveKey = new String(bytes, charset); int indexOf = saveKey.indexOf(prefix); if (indexOf > 0) { log.warn("key缺少前缀"); } else { saveKey = saveKey.substring(indexOf + prefix.length() + 1); } return saveKey; }
public String deserialize(byte[] bytes) { String saveKey = new String(bytes, charset); int indexOf = saveKey.indexOf(prefix); if (indexOf > 0) { log.warn("key缺少前缀"); } else { saveKey = saveKey.substring(indexOf + prefix.length() + 1); } return saveKey; }
public String deserialize(byte[] bytes) { String saveKey = new String(bytes, charset); int indexOf = saveKey.indexOf(prefix); if (indexOf > 0) { log.warn("key缺少前缀"); } else { saveKey = saveKey.substring(indexOf + prefix.length() + 1); } return saveKey; }
public String deserialize(byte[] bytes) { String saveKey = new String(bytes, charset); int indexOf = saveKey.indexOf(prefix); if (indexOf > 0) { log.warn("key缺少前缀"); } else { saveKey = saveKey.substring(indexOf + prefix.length() + 1); } return saveKey; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public StringRedisTemplate stringRedisTemplate(LettuceConnectionFactory redisConnectionFactory) { StringRedisTemplate template = new StringRedisTemplate(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new StringRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new StringRedisSerializer()); template.afterPropertiesSet(); return template; }
public <T> RedisTemplate<String, T> redisTemplate(LettuceConnectionFactory redisConnectionFactory) { RedisTemplate<String, T> template = new RedisTemplate<>(); template.setKeySerializer(new PrefixRedisSerializer()); template.setValueSerializer(new GenericFastJsonRedisSerializer()); template.setConnectionFactory(redisConnectionFactory); template.setHashKeySerializer(new StringRedisSerializer()); template.setHashValueSerializer(new GenericFastJsonRedisSerializer()); template.afterPropertiesSet(); return template; }
public DataSource druidDataSource(){ DruidDataSource datasource = new DruidDataSource(); datasource.setUrl(dataSourceProperties.getUrl()); datasource.setUsername(dataSourceProperties.getUsername()); datasource.setPassword(dataSourceProperties.getPassword()); datasource.setDriverClassName(dataSourceProperties.getDriverClassName()); datasource.setInitialSize(dataSourceProperties.getInitialSize()); datasource.setMinIdle(dataSourceProperties.getMinIdle()); datasource.setMaxActive(dataSourceProperties.getMaxActive()); datasource.setMaxWait(dataSourceProperties.getMaxWait()); datasource.setTimeBetweenEvictionRunsMillis(dataSourceProperties.getTimeBetweenEvictionRunsMillis()); datasource.setMinEvictableIdleTimeMillis(dataSourceProperties.getMinEvictableIdleTimeMillis()); datasource.setValidationQuery(dataSourceProperties.getValidationQuery()); datasource.setTestWhileIdle(dataSourceProperties.isTestWhileIdle()); datasource.setTestOnBorrow(dataSourceProperties.isTestOnBorrow()); datasource.setTestOnReturn(dataSourceProperties.isTestOnReturn()); datasource.setPoolPreparedStatements(dataSourceProperties.isPoolPreparedStatements()); try { datasource.setFilters(dataSourceProperties.getFilters()); } catch (SQLException e) { logger.error("Druid configuration initialization filter error.", e); } return datasource; }
public DataSource druidDataSource(){ DruidDataSource datasource = new DruidDataSource(); datasource.setUrl(dataSourceProperties.getUrl()); datasource.setUsername(dataSourceProperties.getUsername()); datasource.setPassword(dataSourceProperties.getPassword()); datasource.setDriverClassName(dataSourceProperties.getDriverClassName()); datasource.setInitialSize(dataSourceProperties.getInitialSize()); datasource.setMinIdle(dataSourceProperties.getMinIdle()); datasource.setMaxActive(dataSourceProperties.getMaxActive()); datasource.setMaxWait(dataSourceProperties.getMaxWait()); datasource.setTimeBetweenEvictionRunsMillis(dataSourceProperties.getTimeBetweenEvictionRunsMillis()); datasource.setMinEvictableIdleTimeMillis(dataSourceProperties.getMinEvictableIdleTimeMillis()); datasource.setValidationQuery(dataSourceProperties.getValidationQuery()); datasource.setTestWhileIdle(dataSourceProperties.isTestWhileIdle()); datasource.setTestOnBorrow(dataSourceProperties.isTestOnBorrow()); datasource.setTestOnReturn(dataSourceProperties.isTestOnReturn()); datasource.setPoolPreparedStatements(dataSourceProperties.isPoolPreparedStatements()); try { datasource.setFilters(dataSourceProperties.getFilters()); } catch (SQLException e) { logger.error("Druid configuration initialization filter error.", e); } return datasource; }
public DataSource druidDataSource(){ DruidDataSource datasource = new DruidDataSource(); datasource.setUrl(dataSourceProperties.getUrl()); datasource.setUsername(dataSourceProperties.getUsername()); datasource.setPassword(dataSourceProperties.getPassword()); datasource.setDriverClassName(dataSourceProperties.getDriverClassName()); datasource.setInitialSize(dataSourceProperties.getInitialSize()); datasource.setMinIdle(dataSourceProperties.getMinIdle()); datasource.setMaxActive(dataSourceProperties.getMaxActive()); datasource.setMaxWait(dataSourceProperties.getMaxWait()); datasource.setTimeBetweenEvictionRunsMillis(dataSourceProperties.getTimeBetweenEvictionRunsMillis()); datasource.setMinEvictableIdleTimeMillis(dataSourceProperties.getMinEvictableIdleTimeMillis()); datasource.setValidationQuery(dataSourceProperties.getValidationQuery()); datasource.setTestWhileIdle(dataSourceProperties.isTestWhileIdle()); datasource.setTestOnBorrow(dataSourceProperties.isTestOnBorrow()); datasource.setTestOnReturn(dataSourceProperties.isTestOnReturn()); datasource.setPoolPreparedStatements(dataSourceProperties.isPoolPreparedStatements()); try { datasource.setFilters(dataSourceProperties.getFilters()); } catch (SQLException e) { logger.error("Druid configuration initialization filter error.", e); } return datasource; }
public DataSource druidDataSource(){ DruidDataSource datasource = new DruidDataSource(); datasource.setUrl(dataSourceProperties.getUrl()); datasource.setUsername(dataSourceProperties.getUsername()); datasource.setPassword(dataSourceProperties.getPassword()); datasource.setDriverClassName(dataSourceProperties.getDriverClassName()); datasource.setInitialSize(dataSourceProperties.getInitialSize()); datasource.setMinIdle(dataSourceProperties.getMinIdle()); datasource.setMaxActive(dataSourceProperties.getMaxActive()); datasource.setMaxWait(dataSourceProperties.getMaxWait()); datasource.setTimeBetweenEvictionRunsMillis(dataSourceProperties.getTimeBetweenEvictionRunsMillis()); datasource.setMinEvictableIdleTimeMillis(dataSourceProperties.getMinEvictableIdleTimeMillis()); datasource.setValidationQuery(dataSourceProperties.getValidationQuery()); datasource.setTestWhileIdle(dataSourceProperties.isTestWhileIdle()); datasource.setTestOnBorrow(dataSourceProperties.isTestOnBorrow()); datasource.setTestOnReturn(dataSourceProperties.isTestOnReturn()); datasource.setPoolPreparedStatements(dataSourceProperties.isPoolPreparedStatements()); try { datasource.setFilters(dataSourceProperties.getFilters()); } catch (SQLException e) { logger.error("Druid configuration initialization filter error.", e); } return datasource; }
public DataSource druidDataSource(){ DruidDataSource datasource = new DruidDataSource(); datasource.setUrl(dataSourceProperties.getUrl()); datasource.setUsername(dataSourceProperties.getUsername()); datasource.setPassword(dataSourceProperties.getPassword()); datasource.setDriverClassName(dataSourceProperties.getDriverClassName()); datasource.setInitialSize(dataSourceProperties.getInitialSize()); datasource.setMinIdle(dataSourceProperties.getMinIdle()); datasource.setMaxActive(dataSourceProperties.getMaxActive()); datasource.setMaxWait(dataSourceProperties.getMaxWait()); datasource.setTimeBetweenEvictionRunsMillis(dataSourceProperties.getTimeBetweenEvictionRunsMillis()); datasource.setMinEvictableIdleTimeMillis(dataSourceProperties.getMinEvictableIdleTimeMillis()); datasource.setValidationQuery(dataSourceProperties.getValidationQuery()); datasource.setTestWhileIdle(dataSourceProperties.isTestWhileIdle()); datasource.setTestOnBorrow(dataSourceProperties.isTestOnBorrow()); datasource.setTestOnReturn(dataSourceProperties.isTestOnReturn()); datasource.setPoolPreparedStatements(dataSourceProperties.isPoolPreparedStatements()); try { datasource.setFilters(dataSourceProperties.getFilters()); } catch (SQLException e) { logger.error("Druid configuration initialization filter error.", e); } return datasource; }
public DataSource druidDataSource(){ DruidDataSource datasource = new DruidDataSource(); datasource.setUrl(dataSourceProperties.getUrl()); datasource.setUsername(dataSourceProperties.getUsername()); datasource.setPassword(dataSourceProperties.getPassword()); datasource.setDriverClassName(dataSourceProperties.getDriverClassName()); datasource.setInitialSize(dataSourceProperties.getInitialSize()); datasource.setMinIdle(dataSourceProperties.getMinIdle()); datasource.setMaxActive(dataSourceProperties.getMaxActive()); datasource.setMaxWait(dataSourceProperties.getMaxWait()); datasource.setTimeBetweenEvictionRunsMillis(dataSourceProperties.getTimeBetweenEvictionRunsMillis()); datasource.setMinEvictableIdleTimeMillis(dataSourceProperties.getMinEvictableIdleTimeMillis()); datasource.setValidationQuery(dataSourceProperties.getValidationQuery()); datasource.setTestWhileIdle(dataSourceProperties.isTestWhileIdle()); datasource.setTestOnBorrow(dataSourceProperties.isTestOnBorrow()); datasource.setTestOnReturn(dataSourceProperties.isTestOnReturn()); datasource.setPoolPreparedStatements(dataSourceProperties.isPoolPreparedStatements()); try { datasource.setFilters(dataSourceProperties.getFilters()); } catch (SQLException e) { logger.error("Druid configuration initialization filter error.", e); } return datasource; }
public DataSource druidDataSource(){ DruidDataSource datasource = new DruidDataSource(); datasource.setUrl(dataSourceProperties.getUrl()); datasource.setUsername(dataSourceProperties.getUsername()); datasource.setPassword(dataSourceProperties.getPassword()); datasource.setDriverClassName(dataSourceProperties.getDriverClassName()); datasource.setInitialSize(dataSourceProperties.getInitialSize()); datasource.setMinIdle(dataSourceProperties.getMinIdle()); datasource.setMaxActive(dataSourceProperties.getMaxActive()); datasource.setMaxWait(dataSourceProperties.getMaxWait()); datasource.setTimeBetweenEvictionRunsMillis(dataSourceProperties.getTimeBetweenEvictionRunsMillis()); datasource.setMinEvictableIdleTimeMillis(dataSourceProperties.getMinEvictableIdleTimeMillis()); datasource.setValidationQuery(dataSourceProperties.getValidationQuery()); datasource.setTestWhileIdle(dataSourceProperties.isTestWhileIdle()); datasource.setTestOnBorrow(dataSourceProperties.isTestOnBorrow()); datasource.setTestOnReturn(dataSourceProperties.isTestOnReturn()); datasource.setPoolPreparedStatements(dataSourceProperties.isPoolPreparedStatements()); try { datasource.setFilters(dataSourceProperties.getFilters()); } catch (SQLException e) { logger.error("Druid configuration initialization filter error.", e); } return datasource; }
public DataSource druidDataSource(){ DruidDataSource datasource = new DruidDataSource(); datasource.setUrl(dataSourceProperties.getUrl()); datasource.setUsername(dataSourceProperties.getUsername()); datasource.setPassword(dataSourceProperties.getPassword()); datasource.setDriverClassName(dataSourceProperties.getDriverClassName()); datasource.setInitialSize(dataSourceProperties.getInitialSize()); datasource.setMinIdle(dataSourceProperties.getMinIdle()); datasource.setMaxActive(dataSourceProperties.getMaxActive()); datasource.setMaxWait(dataSourceProperties.getMaxWait()); datasource.setTimeBetweenEvictionRunsMillis(dataSourceProperties.getTimeBetweenEvictionRunsMillis()); datasource.setMinEvictableIdleTimeMillis(dataSourceProperties.getMinEvictableIdleTimeMillis()); datasource.setValidationQuery(dataSourceProperties.getValidationQuery()); datasource.setTestWhileIdle(dataSourceProperties.isTestWhileIdle()); datasource.setTestOnBorrow(dataSourceProperties.isTestOnBorrow()); datasource.setTestOnReturn(dataSourceProperties.isTestOnReturn()); datasource.setPoolPreparedStatements(dataSourceProperties.isPoolPreparedStatements()); try { datasource.setFilters(dataSourceProperties.getFilters()); } catch (SQLException e) { logger.error("Druid configuration initialization filter error.", e); } return datasource; }
public DataSource druidDataSource(){ DruidDataSource datasource = new DruidDataSource(); datasource.setUrl(dataSourceProperties.getUrl()); datasource.setUsername(dataSourceProperties.getUsername()); datasource.setPassword(dataSourceProperties.getPassword()); datasource.setDriverClassName(dataSourceProperties.getDriverClassName()); datasource.setInitialSize(dataSourceProperties.getInitialSize()); datasource.setMinIdle(dataSourceProperties.getMinIdle()); datasource.setMaxActive(dataSourceProperties.getMaxActive()); datasource.setMaxWait(dataSourceProperties.getMaxWait()); datasource.setTimeBetweenEvictionRunsMillis(dataSourceProperties.getTimeBetweenEvictionRunsMillis()); datasource.setMinEvictableIdleTimeMillis(dataSourceProperties.getMinEvictableIdleTimeMillis()); datasource.setValidationQuery(dataSourceProperties.getValidationQuery()); datasource.setTestWhileIdle(dataSourceProperties.isTestWhileIdle()); datasource.setTestOnBorrow(dataSourceProperties.isTestOnBorrow()); datasource.setTestOnReturn(dataSourceProperties.isTestOnReturn()); datasource.setPoolPreparedStatements(dataSourceProperties.isPoolPreparedStatements()); try { datasource.setFilters(dataSourceProperties.getFilters()); } catch (SQLException e) { logger.error("Druid configuration initialization filter error.", e); } return datasource; }
public DataSource druidDataSource(){ DruidDataSource datasource = new DruidDataSource(); datasource.setUrl(dataSourceProperties.getUrl()); datasource.setUsername(dataSourceProperties.getUsername()); datasource.setPassword(dataSourceProperties.getPassword()); datasource.setDriverClassName(dataSourceProperties.getDriverClassName()); datasource.setInitialSize(dataSourceProperties.getInitialSize()); datasource.setMinIdle(dataSourceProperties.getMinIdle()); datasource.setMaxActive(dataSourceProperties.getMaxActive()); datasource.setMaxWait(dataSourceProperties.getMaxWait()); datasource.setTimeBetweenEvictionRunsMillis(dataSourceProperties.getTimeBetweenEvictionRunsMillis()); datasource.setMinEvictableIdleTimeMillis(dataSourceProperties.getMinEvictableIdleTimeMillis()); datasource.setValidationQuery(dataSourceProperties.getValidationQuery()); datasource.setTestWhileIdle(dataSourceProperties.isTestWhileIdle()); datasource.setTestOnBorrow(dataSourceProperties.isTestOnBorrow()); datasource.setTestOnReturn(dataSourceProperties.isTestOnReturn()); datasource.setPoolPreparedStatements(dataSourceProperties.isPoolPreparedStatements()); try { datasource.setFilters(dataSourceProperties.getFilters()); } catch (SQLException e) { logger.error("Druid configuration initialization filter error.", e); } return datasource; }
public DataSource druidDataSource(){ DruidDataSource datasource = new DruidDataSource(); datasource.setUrl(dataSourceProperties.getUrl()); datasource.setUsername(dataSourceProperties.getUsername()); datasource.setPassword(dataSourceProperties.getPassword()); datasource.setDriverClassName(dataSourceProperties.getDriverClassName()); datasource.setInitialSize(dataSourceProperties.getInitialSize()); datasource.setMinIdle(dataSourceProperties.getMinIdle()); datasource.setMaxActive(dataSourceProperties.getMaxActive()); datasource.setMaxWait(dataSourceProperties.getMaxWait()); datasource.setTimeBetweenEvictionRunsMillis(dataSourceProperties.getTimeBetweenEvictionRunsMillis()); datasource.setMinEvictableIdleTimeMillis(dataSourceProperties.getMinEvictableIdleTimeMillis()); datasource.setValidationQuery(dataSourceProperties.getValidationQuery()); datasource.setTestWhileIdle(dataSourceProperties.isTestWhileIdle()); datasource.setTestOnBorrow(dataSourceProperties.isTestOnBorrow()); datasource.setTestOnReturn(dataSourceProperties.isTestOnReturn()); datasource.setPoolPreparedStatements(dataSourceProperties.isPoolPreparedStatements()); try { datasource.setFilters(dataSourceProperties.getFilters()); } catch (SQLException e) { logger.error("Druid configuration initialization filter error.", e); } return datasource; }
public DataSource druidDataSource(){ DruidDataSource datasource = new DruidDataSource(); datasource.setUrl(dataSourceProperties.getUrl()); datasource.setUsername(dataSourceProperties.getUsername()); datasource.setPassword(dataSourceProperties.getPassword()); datasource.setDriverClassName(dataSourceProperties.getDriverClassName()); datasource.setInitialSize(dataSourceProperties.getInitialSize()); datasource.setMinIdle(dataSourceProperties.getMinIdle()); datasource.setMaxActive(dataSourceProperties.getMaxActive()); datasource.setMaxWait(dataSourceProperties.getMaxWait()); datasource.setTimeBetweenEvictionRunsMillis(dataSourceProperties.getTimeBetweenEvictionRunsMillis()); datasource.setMinEvictableIdleTimeMillis(dataSourceProperties.getMinEvictableIdleTimeMillis()); datasource.setValidationQuery(dataSourceProperties.getValidationQuery()); datasource.setTestWhileIdle(dataSourceProperties.isTestWhileIdle()); datasource.setTestOnBorrow(dataSourceProperties.isTestOnBorrow()); datasource.setTestOnReturn(dataSourceProperties.isTestOnReturn()); datasource.setPoolPreparedStatements(dataSourceProperties.isPoolPreparedStatements()); try { datasource.setFilters(dataSourceProperties.getFilters()); } catch (SQLException e) { logger.error("Druid configuration initialization filter error.", e); } return datasource; }
public DataSource druidDataSource(){ DruidDataSource datasource = new DruidDataSource(); datasource.setUrl(dataSourceProperties.getUrl()); datasource.setUsername(dataSourceProperties.getUsername()); datasource.setPassword(dataSourceProperties.getPassword()); datasource.setDriverClassName(dataSourceProperties.getDriverClassName()); datasource.setInitialSize(dataSourceProperties.getInitialSize()); datasource.setMinIdle(dataSourceProperties.getMinIdle()); datasource.setMaxActive(dataSourceProperties.getMaxActive()); datasource.setMaxWait(dataSourceProperties.getMaxWait()); datasource.setTimeBetweenEvictionRunsMillis(dataSourceProperties.getTimeBetweenEvictionRunsMillis()); datasource.setMinEvictableIdleTimeMillis(dataSourceProperties.getMinEvictableIdleTimeMillis()); datasource.setValidationQuery(dataSourceProperties.getValidationQuery()); datasource.setTestWhileIdle(dataSourceProperties.isTestWhileIdle()); datasource.setTestOnBorrow(dataSourceProperties.isTestOnBorrow()); datasource.setTestOnReturn(dataSourceProperties.isTestOnReturn()); datasource.setPoolPreparedStatements(dataSourceProperties.isPoolPreparedStatements()); try { datasource.setFilters(dataSourceProperties.getFilters()); } catch (SQLException e) { logger.error("Druid configuration initialization filter error.", e); } return datasource; }
public DataSource druidDataSource(){ DruidDataSource datasource = new DruidDataSource(); datasource.setUrl(dataSourceProperties.getUrl()); datasource.setUsername(dataSourceProperties.getUsername()); datasource.setPassword(dataSourceProperties.getPassword()); datasource.setDriverClassName(dataSourceProperties.getDriverClassName()); datasource.setInitialSize(dataSourceProperties.getInitialSize()); datasource.setMinIdle(dataSourceProperties.getMinIdle()); datasource.setMaxActive(dataSourceProperties.getMaxActive()); datasource.setMaxWait(dataSourceProperties.getMaxWait()); datasource.setTimeBetweenEvictionRunsMillis(dataSourceProperties.getTimeBetweenEvictionRunsMillis()); datasource.setMinEvictableIdleTimeMillis(dataSourceProperties.getMinEvictableIdleTimeMillis()); datasource.setValidationQuery(dataSourceProperties.getValidationQuery()); datasource.setTestWhileIdle(dataSourceProperties.isTestWhileIdle()); datasource.setTestOnBorrow(dataSourceProperties.isTestOnBorrow()); datasource.setTestOnReturn(dataSourceProperties.isTestOnReturn()); datasource.setPoolPreparedStatements(dataSourceProperties.isPoolPreparedStatements()); try { datasource.setFilters(dataSourceProperties.getFilters()); } catch (SQLException e) { logger.error("Druid configuration initialization filter error.", e); } return datasource; }
public DataSource druidDataSource(){ DruidDataSource datasource = new DruidDataSource(); datasource.setUrl(dataSourceProperties.getUrl()); datasource.setUsername(dataSourceProperties.getUsername()); datasource.setPassword(dataSourceProperties.getPassword()); datasource.setDriverClassName(dataSourceProperties.getDriverClassName()); datasource.setInitialSize(dataSourceProperties.getInitialSize()); datasource.setMinIdle(dataSourceProperties.getMinIdle()); datasource.setMaxActive(dataSourceProperties.getMaxActive()); datasource.setMaxWait(dataSourceProperties.getMaxWait()); datasource.setTimeBetweenEvictionRunsMillis(dataSourceProperties.getTimeBetweenEvictionRunsMillis()); datasource.setMinEvictableIdleTimeMillis(dataSourceProperties.getMinEvictableIdleTimeMillis()); datasource.setValidationQuery(dataSourceProperties.getValidationQuery()); datasource.setTestWhileIdle(dataSourceProperties.isTestWhileIdle()); datasource.setTestOnBorrow(dataSourceProperties.isTestOnBorrow()); datasource.setTestOnReturn(dataSourceProperties.isTestOnReturn()); datasource.setPoolPreparedStatements(dataSourceProperties.isPoolPreparedStatements()); try { datasource.setFilters(dataSourceProperties.getFilters()); } catch (SQLException e) { logger.error("Druid configuration initialization filter error.", e); } return datasource; }
public DataSource druidDataSource(){ DruidDataSource datasource = new DruidDataSource(); datasource.setUrl(dataSourceProperties.getUrl()); datasource.setUsername(dataSourceProperties.getUsername()); datasource.setPassword(dataSourceProperties.getPassword()); datasource.setDriverClassName(dataSourceProperties.getDriverClassName()); datasource.setInitialSize(dataSourceProperties.getInitialSize()); datasource.setMinIdle(dataSourceProperties.getMinIdle()); datasource.setMaxActive(dataSourceProperties.getMaxActive()); datasource.setMaxWait(dataSourceProperties.getMaxWait()); datasource.setTimeBetweenEvictionRunsMillis(dataSourceProperties.getTimeBetweenEvictionRunsMillis()); datasource.setMinEvictableIdleTimeMillis(dataSourceProperties.getMinEvictableIdleTimeMillis()); datasource.setValidationQuery(dataSourceProperties.getValidationQuery()); datasource.setTestWhileIdle(dataSourceProperties.isTestWhileIdle()); datasource.setTestOnBorrow(dataSourceProperties.isTestOnBorrow()); datasource.setTestOnReturn(dataSourceProperties.isTestOnReturn()); datasource.setPoolPreparedStatements(dataSourceProperties.isPoolPreparedStatements()); try { datasource.setFilters(dataSourceProperties.getFilters()); } catch (SQLException e) { logger.error("Druid configuration initialization filter error.", e); } return datasource; }
public DataSource druidDataSource(){ DruidDataSource datasource = new DruidDataSource(); datasource.setUrl(dataSourceProperties.getUrl()); datasource.setUsername(dataSourceProperties.getUsername()); datasource.setPassword(dataSourceProperties.getPassword()); datasource.setDriverClassName(dataSourceProperties.getDriverClassName()); datasource.setInitialSize(dataSourceProperties.getInitialSize()); datasource.setMinIdle(dataSourceProperties.getMinIdle()); datasource.setMaxActive(dataSourceProperties.getMaxActive()); datasource.setMaxWait(dataSourceProperties.getMaxWait()); datasource.setTimeBetweenEvictionRunsMillis(dataSourceProperties.getTimeBetweenEvictionRunsMillis()); datasource.setMinEvictableIdleTimeMillis(dataSourceProperties.getMinEvictableIdleTimeMillis()); datasource.setValidationQuery(dataSourceProperties.getValidationQuery()); datasource.setTestWhileIdle(dataSourceProperties.isTestWhileIdle()); datasource.setTestOnBorrow(dataSourceProperties.isTestOnBorrow()); datasource.setTestOnReturn(dataSourceProperties.isTestOnReturn()); datasource.setPoolPreparedStatements(dataSourceProperties.isPoolPreparedStatements()); try { datasource.setFilters(dataSourceProperties.getFilters()); } catch (SQLException e) { logger.error("Druid configuration initialization filter error.", e); } return datasource; }
public DataSource druidDataSource(){ DruidDataSource datasource = new DruidDataSource(); datasource.setUrl(dataSourceProperties.getUrl()); datasource.setUsername(dataSourceProperties.getUsername()); datasource.setPassword(dataSourceProperties.getPassword()); datasource.setDriverClassName(dataSourceProperties.getDriverClassName()); datasource.setInitialSize(dataSourceProperties.getInitialSize()); datasource.setMinIdle(dataSourceProperties.getMinIdle()); datasource.setMaxActive(dataSourceProperties.getMaxActive()); datasource.setMaxWait(dataSourceProperties.getMaxWait()); datasource.setTimeBetweenEvictionRunsMillis(dataSourceProperties.getTimeBetweenEvictionRunsMillis()); datasource.setMinEvictableIdleTimeMillis(dataSourceProperties.getMinEvictableIdleTimeMillis()); datasource.setValidationQuery(dataSourceProperties.getValidationQuery()); datasource.setTestWhileIdle(dataSourceProperties.isTestWhileIdle()); datasource.setTestOnBorrow(dataSourceProperties.isTestOnBorrow()); datasource.setTestOnReturn(dataSourceProperties.isTestOnReturn()); datasource.setPoolPreparedStatements(dataSourceProperties.isPoolPreparedStatements()); try { datasource.setFilters(dataSourceProperties.getFilters()); } catch (SQLException e) { logger.error("Druid configuration initialization filter error.", e); } return datasource; }
public DataSource druidDataSource(){ DruidDataSource datasource = new DruidDataSource(); datasource.setUrl(dataSourceProperties.getUrl()); datasource.setUsername(dataSourceProperties.getUsername()); datasource.setPassword(dataSourceProperties.getPassword()); datasource.setDriverClassName(dataSourceProperties.getDriverClassName()); datasource.setInitialSize(dataSourceProperties.getInitialSize()); datasource.setMinIdle(dataSourceProperties.getMinIdle()); datasource.setMaxActive(dataSourceProperties.getMaxActive()); datasource.setMaxWait(dataSourceProperties.getMaxWait()); datasource.setTimeBetweenEvictionRunsMillis(dataSourceProperties.getTimeBetweenEvictionRunsMillis()); datasource.setMinEvictableIdleTimeMillis(dataSourceProperties.getMinEvictableIdleTimeMillis()); datasource.setValidationQuery(dataSourceProperties.getValidationQuery()); datasource.setTestWhileIdle(dataSourceProperties.isTestWhileIdle()); datasource.setTestOnBorrow(dataSourceProperties.isTestOnBorrow()); datasource.setTestOnReturn(dataSourceProperties.isTestOnReturn()); datasource.setPoolPreparedStatements(dataSourceProperties.isPoolPreparedStatements()); try { datasource.setFilters(dataSourceProperties.getFilters()); } catch (SQLException e) { logger.error("Druid configuration initialization filter error.", e); } return datasource; }
public DataSource druidDataSource(){ DruidDataSource datasource = new DruidDataSource(); datasource.setUrl(dataSourceProperties.getUrl()); datasource.setUsername(dataSourceProperties.getUsername()); datasource.setPassword(dataSourceProperties.getPassword()); datasource.setDriverClassName(dataSourceProperties.getDriverClassName()); datasource.setInitialSize(dataSourceProperties.getInitialSize()); datasource.setMinIdle(dataSourceProperties.getMinIdle()); datasource.setMaxActive(dataSourceProperties.getMaxActive()); datasource.setMaxWait(dataSourceProperties.getMaxWait()); datasource.setTimeBetweenEvictionRunsMillis(dataSourceProperties.getTimeBetweenEvictionRunsMillis()); datasource.setMinEvictableIdleTimeMillis(dataSourceProperties.getMinEvictableIdleTimeMillis()); datasource.setValidationQuery(dataSourceProperties.getValidationQuery()); datasource.setTestWhileIdle(dataSourceProperties.isTestWhileIdle()); datasource.setTestOnBorrow(dataSourceProperties.isTestOnBorrow()); datasource.setTestOnReturn(dataSourceProperties.isTestOnReturn()); datasource.setPoolPreparedStatements(dataSourceProperties.isPoolPreparedStatements()); try { datasource.setFilters(dataSourceProperties.getFilters()); } catch (SQLException e) { logger.error("Druid configuration initialization filter error.", e); } return datasource; }
public ThreadPoolTaskExecutor asyncThreadPoolTaskExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(5); executor.setMaxPoolSize(20); executor.setQueueCapacity(100); executor.setKeepAliveSeconds(30); executor.setThreadNamePrefix("Febs-Gateway-Async-Thread"); executor.setWaitForTasksToCompleteOnShutdown(true); executor.setAwaitTerminationSeconds(60); executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); executor.initialize(); return executor; }
public ThreadPoolTaskExecutor asyncThreadPoolTaskExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(5); executor.setMaxPoolSize(20); executor.setQueueCapacity(100); executor.setKeepAliveSeconds(30); executor.setThreadNamePrefix("Febs-Async-Thread"); executor.setWaitForTasksToCompleteOnShutdown(true); executor.setAwaitTerminationSeconds(60); executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); executor.initialize(); return executor; }
public ThreadPoolTaskExecutor asyncThreadPoolTaskExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(5); executor.setMaxPoolSize(20); executor.setQueueCapacity(100); executor.setKeepAliveSeconds(30); executor.setThreadNamePrefix("Febs-Gateway-Async-Thread"); executor.setWaitForTasksToCompleteOnShutdown(true); executor.setAwaitTerminationSeconds(60); executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); executor.initialize(); return executor; }
public ThreadPoolTaskExecutor scheduleJobExecutorService() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(5); executor.setMaxPoolSize(10); executor.setQueueCapacity(20); executor.setKeepAliveSeconds(30); executor.setThreadNamePrefix("Febs-Job-Thread"); executor.setWaitForTasksToCompleteOnShutdown(true); executor.setAwaitTerminationSeconds(60); executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); executor.initialize(); return executor; }
public void setSerializer(RedisTemplate redisTemplate) { StringRedisSerializer stringRedisSerializer = new StringRedisSerializer(); Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class); ObjectMapper om = new ObjectMapper(); om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); jackson2JsonRedisSerializer.setObjectMapper(om); //设置键(key)的序列化方式 redisTemplate.setKeySerializer(stringRedisSerializer); //设置值(value)的序列化方式 redisTemplate.setHashKeySerializer(stringRedisSerializer); redisTemplate.setHashValueSerializer(jackson2JsonRedisSerializer); redisTemplate.afterPropertiesSet(); }
public void setSerializer(RedisTemplate redisTemplate) { StringRedisSerializer stringRedisSerializer = new StringRedisSerializer(); Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class); ObjectMapper om = new ObjectMapper(); om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); jackson2JsonRedisSerializer.setObjectMapper(om); //设置键(key)的序列化方式 redisTemplate.setKeySerializer(stringRedisSerializer); //设置值(value)的序列化方式 redisTemplate.setHashKeySerializer(stringRedisSerializer); redisTemplate.setHashValueSerializer(jackson2JsonRedisSerializer); redisTemplate.afterPropertiesSet(); }
public void setSerializer(RedisTemplate redisTemplate) { StringRedisSerializer stringRedisSerializer = new StringRedisSerializer(); Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class); ObjectMapper om = new ObjectMapper(); om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); jackson2JsonRedisSerializer.setObjectMapper(om); //设置键(key)的序列化方式 redisTemplate.setKeySerializer(stringRedisSerializer); //设置值(value)的序列化方式 redisTemplate.setHashKeySerializer(stringRedisSerializer); redisTemplate.setHashValueSerializer(jackson2JsonRedisSerializer); redisTemplate.afterPropertiesSet(); }
public void setSerializer(RedisTemplate redisTemplate) { StringRedisSerializer stringRedisSerializer = new StringRedisSerializer(); Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class); ObjectMapper om = new ObjectMapper(); om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); jackson2JsonRedisSerializer.setObjectMapper(om); //设置键(key)的序列化方式 redisTemplate.setKeySerializer(stringRedisSerializer); //设置值(value)的序列化方式 redisTemplate.setHashKeySerializer(stringRedisSerializer); redisTemplate.setHashValueSerializer(jackson2JsonRedisSerializer); redisTemplate.afterPropertiesSet(); }
public void setSerializer(RedisTemplate redisTemplate) { StringRedisSerializer stringRedisSerializer = new StringRedisSerializer(); Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class); ObjectMapper om = new ObjectMapper(); om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); jackson2JsonRedisSerializer.setObjectMapper(om); //设置键(key)的序列化方式 redisTemplate.setKeySerializer(stringRedisSerializer); //设置值(value)的序列化方式 redisTemplate.setHashKeySerializer(stringRedisSerializer); redisTemplate.setHashValueSerializer(jackson2JsonRedisSerializer); redisTemplate.afterPropertiesSet(); }
public void setSerializer(RedisTemplate redisTemplate) { StringRedisSerializer stringRedisSerializer = new StringRedisSerializer(); Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class); ObjectMapper om = new ObjectMapper(); om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); jackson2JsonRedisSerializer.setObjectMapper(om); //设置键(key)的序列化方式 redisTemplate.setKeySerializer(stringRedisSerializer); //设置值(value)的序列化方式 redisTemplate.setHashKeySerializer(stringRedisSerializer); redisTemplate.setHashValueSerializer(jackson2JsonRedisSerializer); redisTemplate.afterPropertiesSet(); }
private PageHelper getPageHelper(){ //配置分页插件,详情请查阅官方文档 PageHelper pageHelper = new PageHelper(); Properties properties = new Properties(); //分页尺寸为0时查询所有纪录不再执行分页 properties.setProperty("pageSizeZero", "true"); //页码<=0 查询第一页,页码>=总页数查询最后一页 properties.setProperty("reasonable", "true"); //支持通过 Mapper 接口参数来传递分页参数 properties.setProperty("supportMethodsArguments", "true"); properties.setProperty("params", "count=countSql"); //切换数据源,自动解析不同数据库的分页 properties.setProperty("autoRuntimeDialect", "true"); pageHelper.setProperties(properties); return pageHelper; }
private PageHelper getPageHelper(){ //配置分页插件,详情请查阅官方文档 PageHelper pageHelper = new PageHelper(); Properties properties = new Properties(); //分页尺寸为0时查询所有纪录不再执行分页 properties.setProperty("pageSizeZero", "true"); //页码<=0 查询第一页,页码>=总页数查询最后一页 properties.setProperty("reasonable", "true"); //支持通过 Mapper 接口参数来传递分页参数 properties.setProperty("supportMethodsArguments", "true"); properties.setProperty("params", "count=countSql"); //切换数据源,自动解析不同数据库的分页 properties.setProperty("autoRuntimeDialect", "true"); pageHelper.setProperties(properties); return pageHelper; }
public KeyGenerator keyGenerator() { return new KeyGenerator() { @Override public Object generate(Object o, Method method, Object... objects) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(o.getClass().getName()).append(method.getName()); for (Object object : objects) { stringBuilder.append(object.toString()); } return stringBuilder.toString(); } }; }
public KeyGenerator keyGenerator() { return new KeyGenerator() { @Override public Object generate(Object o, Method method, Object... objects) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(o.getClass().getName()).append(method.getName()); for (Object object : objects) { stringBuilder.append(object.toString()); } return stringBuilder.toString(); } }; }
public KeyGenerator keyGenerator() { return new KeyGenerator() { @Override public Object generate(Object o, Method method, Object... objects) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(o.getClass().getName()).append(method.getName()); for (Object object : objects) { stringBuilder.append(object.toString()); } return stringBuilder.toString(); } }; }
public KeyGenerator keyGenerator() { return new KeyGenerator() { @Override public Object generate(Object o, Method method, Object... objects) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(o.getClass().getName()).append(method.getName()); for (Object object : objects) { stringBuilder.append(object.toString()); } return stringBuilder.toString(); } }; }
public KeyGenerator keyGenerator() { return new KeyGenerator() { @Override public Object generate(Object o, Method method, Object... objects) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(o.getClass().getName()).append(method.getName()); for (Object object : objects) { stringBuilder.append(object.toString()); } return stringBuilder.toString(); } }; }
public KeyGenerator keyGenerator() { return new KeyGenerator() { @Override public Object generate(Object o, Method method, Object... objects) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(o.getClass().getName()).append(method.getName()); for (Object object : objects) { stringBuilder.append(object.toString()); } return stringBuilder.toString(); } }; }
private PageHelper getPageHelper(){ //配置分页插件,详情请查阅官方文档 PageHelper pageHelper = new PageHelper(); Properties properties = new Properties(); //分页尺寸为0时查询所有纪录不再执行分页 properties.setProperty("pageSizeZero", "true"); //页码<=0 查询第一页,页码>=总页数查询最后一页 properties.setProperty("reasonable", "false"); //支持通过 Mapper 接口参数来传递分页参数 properties.setProperty("supportMethodsArguments", "true"); properties.setProperty("params", "count=countSql"); //切换数据源,自动解析不同数据库的分页 properties.setProperty("autoRuntimeDialect", "true"); pageHelper.setProperties(properties); return pageHelper; }
private PageHelper getPageHelper(){ //配置分页插件,详情请查阅官方文档 PageHelper pageHelper = new PageHelper(); Properties properties = new Properties(); //分页尺寸为0时查询所有纪录不再执行分页 properties.setProperty("pageSizeZero", "true"); //页码<=0 查询第一页,页码>=总页数查询最后一页 properties.setProperty("reasonable", "true"); //支持通过 Mapper 接口参数来传递分页参数 properties.setProperty("supportMethodsArguments", "true"); properties.setProperty("params", "count=countSql"); //切换数据源,自动解析不同数据库的分页 properties.setProperty("autoRuntimeDialect", "true"); pageHelper.setProperties(properties); return pageHelper; }
private PageHelper getPageHelper(){ //配置分页插件,详情请查阅官方文档 PageHelper pageHelper = new PageHelper(); Properties properties = new Properties(); //分页尺寸为0时查询所有纪录不再执行分页 properties.setProperty("pageSizeZero", "true"); //页码<=0 查询第一页,页码>=总页数查询最后一页 properties.setProperty("reasonable", "false"); //支持通过 Mapper 接口参数来传递分页参数 properties.setProperty("supportMethodsArguments", "true"); properties.setProperty("params", "count=countSql"); //切换数据源,自动解析不同数据库的分页 properties.setProperty("autoRuntimeDialect", "true"); pageHelper.setProperties(properties); return pageHelper; }
private PageHelper getPageHelper(){ //配置分页插件,详情请查阅官方文档 PageHelper pageHelper = new PageHelper(); Properties properties = new Properties(); //分页尺寸为0时查询所有纪录不再执行分页 properties.setProperty("pageSizeZero", "true"); //页码<=0 查询第一页,页码>=总页数查询最后一页 properties.setProperty("reasonable", "true"); //支持通过 Mapper 接口参数来传递分页参数 properties.setProperty("supportMethodsArguments", "true"); properties.setProperty("params", "count=countSql"); //切换数据源,自动解析不同数据库的分页 properties.setProperty("autoRuntimeDialect", "true"); pageHelper.setProperties(properties); return pageHelper; }
public Executor asyncExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setTaskDecorator(new ContextCopyingDecorator()); executor.setCorePoolSize(3); executor.setMaxPoolSize(5); executor.setQueueCapacity(100); executor.setWaitForTasksToCompleteOnShutdown(true); executor.setThreadNamePrefix("AsyncThread-"); executor.initialize(); return executor; }
public Executor asyncExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); // for passing in request scope context executor.setTaskDecorator(new ContextCopyingDecorator()); executor.setCorePoolSize(3); executor.setMaxPoolSize(5); executor.setQueueCapacity(100); executor.setWaitForTasksToCompleteOnShutdown(true); executor.setThreadNamePrefix("AsyncThread-"); executor.initialize(); return executor; }
public Executor asyncExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); // for passing in request scope context executor.setTaskDecorator(new ContextCopyingDecorator()); executor.setCorePoolSize(3); executor.setMaxPoolSize(5); executor.setQueueCapacity(100); executor.setWaitForTasksToCompleteOnShutdown(true); executor.setThreadNamePrefix("AsyncThread-"); executor.initialize(); return executor; }
public Executor asyncExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setTaskDecorator(new ContextCopyingDecorator()); executor.setCorePoolSize(3); executor.setMaxPoolSize(5); executor.setQueueCapacity(100); executor.setWaitForTasksToCompleteOnShutdown(true); executor.setThreadNamePrefix("AsyncThread-"); executor.initialize(); return executor; }
public Executor asyncExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); // for passing in request scope context executor.setTaskDecorator(new ContextCopyingDecorator()); executor.setCorePoolSize(3); executor.setMaxPoolSize(5); executor.setQueueCapacity(100); executor.setWaitForTasksToCompleteOnShutdown(true); executor.setThreadNamePrefix("AsyncThread-"); executor.initialize(); return executor; }
public Executor asyncExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); // for passing in request scope context executor.setTaskDecorator(new ContextCopyingDecorator()); executor.setCorePoolSize(3); executor.setMaxPoolSize(5); executor.setQueueCapacity(100); executor.setWaitForTasksToCompleteOnShutdown(true); executor.setThreadNamePrefix("AsyncThread-"); executor.initialize(); return executor; }
public Executor asyncExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(3); executor.setMaxPoolSize(5); executor.setQueueCapacity(100); executor.setWaitForTasksToCompleteOnShutdown(true); executor.setThreadNamePrefix("AsyncThread-"); executor.initialize(); return executor; }
public Executor asyncExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setTaskDecorator(new ContextCopyingDecorator()); executor.setCorePoolSize(3); executor.setMaxPoolSize(5); executor.setQueueCapacity(100); executor.setWaitForTasksToCompleteOnShutdown(true); executor.setThreadNamePrefix("AsyncThread-"); executor.initialize(); return executor; }
public Executor asyncExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(3); executor.setMaxPoolSize(5); executor.setQueueCapacity(100); executor.setWaitForTasksToCompleteOnShutdown(true); executor.setThreadNamePrefix("AsyncThread-"); executor.initialize(); return executor; }
public Executor asyncExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); // for passing in request scope context executor.setTaskDecorator(new ContextCopyingDecorator()); executor.setCorePoolSize(3); executor.setMaxPoolSize(5); executor.setQueueCapacity(100); executor.setWaitForTasksToCompleteOnShutdown(true); executor.setThreadNamePrefix("AsyncThread-"); executor.initialize(); return executor; }
public Executor asyncExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(3); executor.setMaxPoolSize(5); executor.setQueueCapacity(100); executor.setWaitForTasksToCompleteOnShutdown(true); executor.setThreadNamePrefix("AsyncThread-"); executor.initialize(); return executor; }
public Executor asyncExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); // for passing in request scope context executor.setTaskDecorator(new ContextCopyingDecorator()); executor.setCorePoolSize(3); executor.setMaxPoolSize(5); executor.setQueueCapacity(100); executor.setWaitForTasksToCompleteOnShutdown(true); executor.setThreadNamePrefix("AsyncThread-"); executor.initialize(); return executor; }